package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.DeleteGroupMemberActivity;
import com.wwtech.epp.ui.activity.friend.contract.DeleteGroupMemberContract;
import com.wwtech.epp.ui.activity.friend.presenter.DeleteGroupMemberPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of DeleteGroupMemberActivity, provide field for DeleteGroupMemberActivity
 * @date 2017/12/07 14:01:54
 */
@Module
public class DeleteGroupMemberModule {
    private final DeleteGroupMemberContract.View mView;


    public DeleteGroupMemberModule(DeleteGroupMemberContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public DeleteGroupMemberPresenter provideDeleteGroupMemberPresenter(HttpAPIWrapper httpAPIWrapper, DeleteGroupMemberActivity mActivity) {
        return new DeleteGroupMemberPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public DeleteGroupMemberActivity provideDeleteGroupMemberActivity() {
        return (DeleteGroupMemberActivity) mView;
    }
}